/**
 * Project: apollo-base-tools
 * 
 * File Created at 2017年8月7日
 * 
 * Copyright 2015-2016 dx.com Croporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * DongXue software Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with dx.com.
 */
package org.apollo.sqlite.utils;

/** 
* @ClassName: SqliteDataUtils 
* @Description: TODO(这里用一句话描述这个类的作用) 
* @author wuzhenfang(wzfbj2008@163.com)
* @date 2017年8月7日 下午4:18:48 
* @version V1.0 
*/
public class SqliteDataUtils {

	public static String capitalize(String word) {
		return word.substring(0, 1).toUpperCase() + word.substring(1);
	}

	public static String lowercase(String word) {
		return word.substring(0, 1).toLowerCase() + word.substring(1);
	}

	public static boolean isEmpty(Object object) {
		if (object == null) {
			return true;
		}
		if (object instanceof String) {
			return ((String) object).trim().length() == 0;
		} else if (object instanceof Float) {
			return ((Float) object) == 0.0f;
		} else if (object instanceof Integer) {
			return ((Integer) object) == 0;
		} else if (object instanceof Long) {
			return ((Long) object) == 0l;
		} else if (object instanceof Double) {
			return ((Double) object) == 0.0d;
		} else if (object instanceof Boolean) {
			return ((Boolean) object) == false;
		}
		return false;
	}
}
